<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet"  th:href="@{/css/bootstrap.min.css}">
    <title>文章管理</title>
    <style>
        a {
            text-decoration: none;
            color: blue;
        }
        tr{
            line-height: 100px;
            font-size:25px;
        }
        td{
            text-align: center;
        }
        .fontsize{
            font-size: 20px;
        }
        li:hover{
            background-color: #269abc;
        }
        li{
            padding-top: 10px;
            padding-bottom: 10px;
        }
        ul:hover{
            background-color: #a6e1ec;
        }
    </style>
</head>
<body>
<div  style="height:8vh;margin-top: 10px;margin-bottom: 10px" th:insert="~{back/header::head}"></div>
<div style="height:92vh;width: 20%;float: left;" th:insert="~{back/header::left}" ></div>
<div style="margin-left: 20%;" >
    <h1 style="text-align: center">文章管理</h1>
    <table style="width: 80%;margin: 40px auto;text-align: center"
           class="table table-hover  table-bordered ">
        <thead>
        <tr>
            <td th:text="序号"></td>
            <td th:text="标题"></td>
            <td th:text="内容"></td>
            <td th:text="作者"></td>
            <td th:text="发布时间"></td>
            <td th:text="操作"></td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="article,status:${articlePageInfo.getList()}">
            <td th:text="${status.count}"></td>
            <td th:text="${article.getTitle()}"></td>
            <td th:text="${article.getContent()}"></td>
            <td th:text="${article.getAuthor()}"></td>
            <td th:text="${article.getPosttime()}"></td>
            <td>
                <a th:href="@{/front/article(id = ${article.getArtid()},isBack = 1)}"
                   style="color: #269abc" th:text="详情"></a>
                <a th:href="@{/back/toEditArticle(isModify = 1,aId = ${article.getArtid()},
                title = ${article.getTitle()},content = ${article.getContent()})}"
                   style="color: #ff6c54" th:text="修改"></a>
                <a th:href="@{/back/deleteArticle(id = ${article.getArtid()})}"
                   style="color: red" th:text="删除"></a>
            </td>
        </tr>
        </tbody>
    </table>
    <div style="text-align: center;margin-top: 30px" class="fontsize">
        <a th:href="@{/(pageNum=1,contentSize = 6)}">首页</a>
        <label th:if="${!articlePageInfo.isIsFirstPage()}">
            <a th:href="@{/(pageNum=${articlePageInfo.getPrePage()},contentSize = 6)}">上一页</a>
        </label>
        <label th:if="${!articlePageInfo.isIsLastPage()}">
            <a th:href="@{/(pageNum=${articlePageInfo.getNextPage()},contentSize = 6)}">下一页</a>
        </label>
        <a th:href="@{/(pageNum=${articlePageInfo.getPages()},contentSize = 6)}">尾页</a>
        当前第<span th:text="${articlePageInfo.getPageNum()}"></span>页/共<span
            th:text="${articlePageInfo.getPages()}"></span>页
        每页<span th:text="${articlePageInfo.getPageSize()}"></span>条记录
        共有<span th:text="${articlePageInfo.getTotal()}"></span>条记录
    </div>
</div>
</body>

</html>